home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Technical Documentation / Inside Macintosh / Macintosh TB Essentials / Macintosh TB Essentials.rsrc / TOC#_1000 < prev   
Encoding:
Text File  |  1994-07-24  |  32.9 KB  |  36 lines

  1. ™Macintosh Toolbox EssentialsContentsFigures, Tables, and Listings
  2. About This BookFormat of a Typical ChapterConventions Used in This Book
  3. Special FontsTypes of Notes
  4. Empty StringsAssembly-Language InformationThe Development Environment%Introduction to the Macintosh ToolboxKFigure 1-1    The SurfWriter application with multiple windows on the desktop !Overview of the Macintosh ToolboxEvents
  5. MenusWindowsFigure 1-2    A typical windowControlsFigure 1-3    Common controlsAlert Boxes and Dialog BoxesFigure 1-4    An alert box:Figure 1-5    Modal, movable modal, and modeless dialog boxes,Icons and Other Interactions With the Finder
  6.  
  7. Resources
  8. Help BalloonsCopy and Paste Related System Software FeaturesDrawing on the Screen
  9. Handling TextManaging Files)Allocating Memory and Launching Processes#Creating Publishers and Subscribers&
  10. Communicating With Other ApplicationsDesigning Your Application
  11. Event ManagerIntroduction to Events5Figure 2-1    Sources of events sent to your application
  12. Low-Level EventsFigure 2-2    
  13. Low-level eventsOperating-System Events$Figure 2-3    
  14. Operating-system events 
  15. High-Level EventsFigure 2-4    
  16. High-level eventsPriority of EventsSwitching ContextsAbout the Event ManagerUsing the Event Manager"Obtaining Information About Events3Figure 2-5    The modifiers field of the event record Processing Events Using the WaitNextEvent Function,Listing 2-1    Using the WaitNextEvent functionWriting an Event LoopListing 2-2    An event loopListing 2-3    
  17. Processing events Setting the Event MaskFigure 2-6    The event maskHandling Events in a Dialog BoxCreating a Size Resource7Listing 2-4    The Rez input for a sample 'SIZE' resource Handling Low-Level EventsResponding to Mouse Events&Listing 2-5    Handling mouse-down eventsResponding to Keyboard EventsDFigure 2-7    The message field of the event record for keyboard events Figure 2-8    
  18. Keyboard translationCFigure 2-9    Virtual key codes for the Apple Keyboard II, ISO layout CFigure 2-10    
  19. Virtual key codes for the Apple Extended Keyboard II  1Listing 2-6    Handling key-down and auto-key events$Listing 2-7    Handling key-down eventsScanning for a Cancel Event/Listing 2-8    Scanning for a Command-period eventResponding to Update Events7Figure 2-11    
  20. Responding to an update event for a window'Listing 2-9    Responding to update eventsResponding to Activate Events7Figure 2-12    
  21. Responding to activate events for a window*Listing 2-10    Responding to activate events"Responding to Disk-Inserted Events/Listing 2-11    Responding to disk-inserted eventsResponding to Null Events!Listing 2-12    Handling null events Handling Operating-System Events2Listing 2-13    Responding to operating-system events'Responding to Suspend and Resume Events4Listing 2-14    Responding to suspend and resume events Responding to Mouse-Moved Events%Figure 2-13    The standard arrow cursorEFigure 2-14    The I-beam, crosshairs, plus sign, and wristwatch cursors2Figure 2-15    The arrow region and the I-beam regionKFigure 2-16    
  22. Changing the cursor from the I-beam cursor to the arrow cursor Listing 2-15    Changing the cursorHandling High-Level Events ,Responding to Events From Other Applications*Listing 2-16    Accepting a high-level event )Searching for a Specific High-Level Event,Determining the Sender of a High-Level EventSending High-Level Events@Listing 2-17    Posting a high-level event by application signatureGListing 2-18    
  23. Using the PPCBrowser function to post a high-level event Requesting Return ReceiptsHandling Apple EventsEvent Manager Reference
  24. Data StructuresThe Event RecordThe Target ID Record#The High-Level Event Message RecordThe Event Queue
  25. Event Manager RoutinesReceiving Events
  26. WaitNextEvent
  27. EventAvail GetNextEventAcceptHighLevelEventGetSpecificHighLevelEvent FlushEvents SystemClick
  28. SystemTask SystemEvent
  29. GetOSEvent OSEventAvail SetEventMask    GetEvQHdrSending Events
  30. PostHighLevelEvent
  31. PPostEvent    PostEvent0Converting Process Serial Numbers and Port Names#
  32. GetProcessSerialNumberFromPortName#
  33. GetPortNameFromProcessSerialNumber
  34. Reading the MouseGetMouseButton
  35.  
  36. StillDown WaitMouseUp
  37. Reading the KeyboardGetKeys KeyTranslate9Figure 2-17    Structure of the KeyTranslate function result
  38. Getting Timing Information    TickCount
  39. GetDblTime GetCaretTime
  40. Application-Defined Routine8Filter Function for Searching the High-Level Event QueueMyFilterResourceThe Size Resource1Listing 2-19    A Rez template for a 'SIZE' resource
  41. Summary of the Event Manager Menu ManagerIntroduction to Menus9Figure 3-1    A pull-down menu, a submenu, and a pop-up menuMFigure 3-2    The SurfWriter application’s menu bar with the Edit menu displayed%Menu and Menu Bar Definition Routines The Menu Bar5Figure 3-3    The menu bar of the SurfWriter applicationUFigure 3-4    The SurfWriter application’s menu bar localized for another script system 
  42. Menus
  43. Menu Items1Figure 3-5    Two menus with various characteristicsGroups of Menu Items4Figure 3-6    
  44. Menu items in a mutually exclusive group.Figure 3-7    Menu items in an accumulating group?Figure 3-8    Use of a checkmark and dash in an accumulating group&Keyboard Equivalents for Menu Commands8Table 3-1    Reserved keyboard equivalents for all systems    >Table 3-2    
  45. Reserved keyboard equivalents for worldwide systems,Table 3-3    Other common keyboard equivalents    -Menus Added Automatically by the Menu ManagerThe Apple Menu9Figure 3-9    
  46. The Apple menu for the SurfWriter applicationEFigure 3-10    Choosing the About command of the SurfWriter application 
  47. The File Menu5Figure 3-11    The standard File menu for an application1Table 3-4    Actions for standard File menu commands
  48. The Edit Menu5Figure 3-12    The standard Edit menu for an application1Table 3-5    Actions for standard Edit menu commands
  49. The Font Menu Figure 3-13    A typical Font menu IFigure 3-14    A Font menu showing a selection containing more than one font
  50. The Size MenuFigure 3-15    A typical Size menu>Figure 3-16    A dialog box to select a new point size for a font1Figure 3-17    
  51. Entering a new point size for a font:Figure 3-18    The Other command with a font size added to it
  52. The Help Menu7Figure 3-19    The Help menu of the SurfWriter applicationJFigure 3-20    
  53. Default help balloons for the Apple menu and Application menuAFigure 3-21    Help balloons for different states of the Cut command
  54. The Keyboard Menu;Figure 3-22    Accessing the Keyboard menu from an applicationThe Application Menu)Figure 3-23    SurfWriter’s Application menu Pop-Up MenusFigure 3-24    A pop-up menu8Figure 3-25    A pop-up menu in its closed and open states 1Figure 3-26    Making a selection from a pop-up menu6Figure 3-27    Choosing one attribute from a list of many:Figure 3-28    
  55. A dialog box with checkboxes and pop-up menus?Figure 3-29    A type-in pop-up menu in its closed and open states=Figure 3-30    
  56. A type-in pop-up menu with a user’s choice addedHierarchical Menus5Figure 3-31    
  57. A hierarchical menu item and its submenuAbout the Menu Manager7
  58. How the Menu Manager Maintains Information About MenusJHow the Menu Manager Maintains Information About an Application’s Menu BarUsing the Menu ManagerCreating a MenuCreating a Menu Resource?Listing 3-1    Rez input for a 'MENU' resource for the Apple menu {Table 3-6    
  59. Specifying submenus, script codes, reduced icons, small icons, and color icons of a menu item in a menu resource<Listing 3-2    Rez input for a 'MENU' resource for an Edit menu;Listing 3-3    Rez input for a 'MENU' resource for a File menuCreating a Menu Bar Resource,Listing 3-4    Rez input for an 'MBAR' resource&Setting Up Your Application’s Menu Bar:Listing 3-5    Setting up an application’s menus and menu bar7Listing 3-6    Saving and restoring menu color information
  60. Creating a Hierarchical Menu&Figure 3-32    A menu item with a submenuNListing 3-7     Rez input for a description of a hierarchical menu with a submenu(Listing 3-8    Creating a hierarchical menuCreating a Pop-Up Menu)Figure 3-33    A pop-up menu in a dialog box*Changing the Appearance of Items in a Menu"
  61. Enabling and Disabling Menu ItemsChanging the Text of an Item,Listing 3-9    Changing the text of a menu item%Changing the Font Style of Menu Items1Listing 3-10    Setting the font style of menu items 
  62. Changing the Mark of Menu Items?Listing 3-11    Adding marks to and removing marks from menu items.Changing the Icon or Script Code of Menu Items Figure 3-34    
  63. Icons in menu items,Listing 3-12    Specifying icons for menu itemsAdding Items to a Menu.Listing 3-13    
  64. Rez input for text of menu itemsAdding Items to the Help Menu-Listing 3-14    
  65. Adding an item to the Help menuAdding Items to the Apple Menu0Listing 3-15    Adding menu items to the Apple menuAdding Fonts to a Menu)Listing 3-16    
  66. Adding font names to a menu&Handling User Choice of a Menu Command+
  67. Handling Mouse-Down Events in the Menu Bar<Listing 3-17    Determining whether a mouse-down event occurred<Listing 3-18    Determining when the cursor is in the menu bar %Adjusting the Menus of an Application.Listing 3-19    
  68. Adjusting an application’s menus:Listing 3-20    Adjusting the File menu for a document window:Listing 3-21    Adjusting the Edit menu for a document window3Determining if the User Chose a Keyboard Equivalent.Listing 3-22    Determining when a key is pressed@Listing 3-23    Checking a key-down event for a keyboard equivalent,Responding When the User Chooses a Menu Item>Listing 3-24    Responding to the user’s choice of a menu commandHandling the Apple MenuKListing 3-25    Responding to the user’s choice of an item from the Apple menuHandling the Help MenuLListing 3-26    Responding to the user’s choice of a command from the Help menuHandling a Size Menu7Figure 3-35    
  69. A Size menu with user-specified size added#Listing 3-27    Handling the Size menu!Accessing Menus From a Dialog Box/Figure 3-36    Menu access from a modal dialog box*Writing Your Own Menu Definition Procedure/Listing 3-28    A sample menu definition procedure$Calculating the Dimensions of a Menu+Listing 3-29    Calculating the size of a menu
  70. Drawing Menu Items in a MenuListing 3-30    Drawing menu items9Determining Whether the Cursor Is in an Enabled Menu Item Listing 3-31    Choosing menu itemsMenu Manager ReferenceData StructuresThe Menu Record
  71. The Menu List'The Menu Color Information Table Record,Table 3-7    Color information for menu entriesMenu Manager RoutinesITable 3-8    Mapping between new and previous names of Menu Manager routines
  72. Initializing the Menu Manager    InitMenus InitProcMenu
  73. Creating MenusNewMenuGetMenu=Adding Menus to and Removing Menus From the Current Menu List
  74. InsertMenu
  75. DeleteMenu ClearMenuBar6Getting a Menu Bar Description From an 'MBAR' Resource
  76. GetNewMBar Getting and Setting the Menu Bar
  77. GetMenuBar
  78. SetMenuBar
  79. GetMBarHeightDrawing the Menu Bar DrawMenuBar
  80.  
  81. InvalMenuBar1Responding to the User’s Choice of a Menu Command
  82. MenuSelectMenuKey
  83. MenuChoice
  84. HiliteMenuPopUpMenuSelect
  85. SystemMenu
  86. SystemEdit!Getting a Handle to a Menu Record
  87. GetMenuHandleHMGetHelpMenuHandleAdding and Deleting Menu Items
  88. AppendMenu
  89. InsertMenuItemDeleteMenuItem
  90. AppendResMenu
  91. InsertResMenu0Getting and Setting the Appearance of Menu Items
  92. EnableItem DisableItemGetMenuItemText
  93. SetMenuItemText GetItemStyle SetItemStyle
  94. GetItemMark SetItemMark    CheckItem
  95. GetItemIcon SetItemIcon
  96. GetItemCmd
  97. SetItemCmdDisposing of Menus DisposeMenuCounting the Items in a Menu
  98. CountMItemsHighlighting the Menu Bar FlashMenuBar SetMenuFlashRecalculating Menu Dimensions
  99.  
  100. CalcMenuSize4Managing Entries in the Menu Color Information Table    GetMCInfo    SetMCInfo
  101. DisposeMCInfo
  102. GetMCEntry SetMCEntriesDeleteMCEntries
  103. Application-Defined RoutineThe Menu Definition Procedure    MyMenuDef    ResourcesThe Menu Resource:Figure 3-37    Structure of a compiled menu ('MENU') resourcesFigure 3-38    The variable-length data that describes menu items as defined by the standard menu definition procedure
  104. The Menu Bar Resource>Figure 3-39    Structure of a compiled menu bar ('MBAR') resource)The Menu Color Information Table ResourceRFigure 3-40    Structure of a compiled menu color information table ('mctb') resourceBFigure 3-41    
  105. Structure of a menu color entry in an 'mctb' resource&The Menu Definition Procedure Resource
  106. Summary of the Menu ManagerWindow ManagerIntroduction to WindowsFigure 4-1    Multiple windowsFigure 4-2    A document windowActive and Inactive Windows0Figure 4-3    
  107. Active and inactive document windows
  108. Types of Windows'Figure 4-4    A window of type zoomDocProcPFigure 4-5    
  109. A window of type zoomDocProc, with size box and inactive scroll barsMFigure 4-6    Window types for alert boxes and fixed-position modal dialog boxes,Figure 4-7    
  110. A window of type movableDBoxProc)Figure 4-8    A window of type noGrowDocProc$Figure 4-9    
  111. Seldom-used window types
  112. Window Regions>Figure 4-10    Window frame, content region, and structure regionDialog Boxes and Alert BoxesControlsFigure 4-11    Scroll bars$Figure 4-12    Controls in a dialog boxWindows on the DesktopAbout the Window ManagerGraphics Ports1Figure 4-13    The QuickDraw global coordinate plane;Figure 4-14    
  113. A window’s local and global coordinate systemsWindow Records
  114. Color WindowsEvents in WindowsUsing the Window ManagerManaging Multiple Windows(Listing 4-1    
  115. Determining the window typeCreating a WindowDefining a Window ResourceJListing 4-2    Rez input for a window ('WIND') resource for a document window!Creating a Window From a Resource!Listing 4-3    Creating a new window,Positioning a Document Window on the Desktop9Figure 4-15    
  116. Document window positions on a single screen:Figure 4-16    “Filling in” an empty document window position:Figure 4-17    
  117. Document window positions on multiple screensPListing 4-4    Application-defined data structure for storing a window’s state data/Listing 4-5    Saving a document window’s positionHListing 4-6    
  118. Positioning the window when the user opens a saved document$Listing 4-7    Opening a saved document
  119. Drawing the Window ContentsListing 4-8    Drawing a windowUpdating the Content RegionJFigure 4-18    Moving one window and adding to another window’s update regionMaintaining the Update RegionHandling Events in Windows Handling Mouse Events in Windows&Listing 4-9    Handling mouse-down events7Figure 4-19    The close box with and without highlighting7Figure 4-20    
  120. The zoom box with and without highlighting#Handling Keyboard Events in Windows
  121. Handling Update Events^Figure 4-21    
  122. The effects of BeginUpdate and EndUpdate on the visible region and 
  123. update region#Listing 4-10    Handling update eventsHandling Activate Events%Listing 4-11    Handling activate eventsMoving a WindowZooming a WindowListing 4-12    
  124. Zooming a windowResizing a WindowListing 4-13    Resizing a windowLListing 4-14    Adjusting scroll bars and content region when resizing a window<Listing 4-15    Converting a window region to local coordinatesClosing a Window%Listing 4-16    Handling a close commandListing 4-17    Closing a documentHiding and Showing a WindowNFigure 4-22    The cumulative effects of HideWindow, ShowWindow, and SelectWindow(Listing 4-18    Showing a hidden dialog boxWindow Manager ReferenceData StructuresThe Color Window Record
  125. The Window Record
  126. The Window State Data RecordThe Window Color Table RecordThe Auxiliary Window RecordThe Window List Window Manager RoutinesInitializing the Window Manager InitWindowsCreating Windows
  127. GetNewCWindow
  128.  
  129. GetNewWindow
  130. NewCWindow    NewWindowNaming Windows    SetWTitle
  131.  
  132. GetWTitleDisplaying Windows DrawGrowIcon SelectWindow
  133. ShowWindow
  134. HideWindowShowHide HiliteWindow BringToFront
  135. SendBehindRetrieving Window Information
  136. FindWindow FrontWindowMoving Windows
  137. DragWindow
  138. MoveWindow DragGrayRgn3Figure 4-23    
  139. Limiting rectangle used by DragGrayRgn
  140. PinRectResizing Windows
  141. GrowWindow
  142. SizeWindowZooming WindowsTrackBox
  143. ZoomWindow Closing and Deallocating Windows TrackGoAway CloseWindow
  144. DisposeWindowMaintaining the Update Region BeginUpdate    EndUpdate    InvalRectInvalRgn    ValidRectValidRgn3Setting and Retrieving Other Window Characteristics
  145.  
  146. SetWindowPic GetWindowPic
  147. SetWRefCon
  148. GetWRefCon
  149. GetWVariantManipulating the Desktop SetDeskCPat
  150. GetGrayRgn GetCWMgrPort GetWMgrPort%Manipulating Window Color Information SetWinColor    GetAuxWinLow-Level Routines CheckUpdate    ClipAboveSaveOldDrawNew    
  151. PaintOne PaintBehindCalcVis
  152. CalcVisBehind
  153. Application-Defined RoutineThe Window Definition FunctionMyWindow    ResourcesThe Window Resource<Figure 4-24    Structure of a compiled window ('WIND') resource'The Window Definition Function ResourceThe Window Color Table ResourceIFigure 4-25    
  154. Structure of a compiled window color table ('wctb') resourceSummary of the Window ManagerControl ManagerIntroduction to Controls<Figure 5-1    Standard controls provided by the Control ManagerButtonsFigure 5-2    A default button
  155. CheckboxesFigure 5-3    A selected checkbox
  156. Radio Buttons Pop-Up Menus Scroll Bars Figure 5-4    A vertical scroll bar1Figure 5-5    Using the scroll box and scroll arrowshFigure 5-6    
  157. Spatial relations between a document and a window, and their representation by 
  158. a scroll bar
  159. Other Controls!Figure 5-7    Custom slider controlsActive and Inactive ControlsAFigure 5-8    
  160. Visual feedback for user selection of active controlsFigure 5-9    Inactive controls 
  161. The Control Definition FunctionAbout the Control ManagerUsing the Control Manager!Creating and Displaying a Control,Creating a Button, Checkbox, or Radio Button'Figure 5-10    A button in a simple window*Listing 5-1    Creating a button for a window,Listing 5-2    Rez input for a control resource,Figure 5-11    Radio buttons in a simple windowAListing 5-3    
  162. Rez input for the control resources of radio buttonsCreating Scroll Bars<Figure 5-12    How a scroll bar should overlap the window frameDListing 5-4    Rez input for resources for a window and its scroll bars7Listing 5-5    Creating a document window with scroll barsCreating a Pop-Up MenuFigure 5-13    
  163. A pop-up menu?Listing 5-6    Rez input for the control resource of a pop-up menu.Figure 5-14    Dimensions of a sample pop-up menuUpdating a Control6Listing 5-7    Responding to an update event for a window7Listing 5-8    Redrawing the controls in the update region'Responding to Mouse Events in a Control+Determining a Mouse-Down Event in a Control3Listing 5-9    Detecting mouse-down events in a windowFListing 5-10    Detecting mouse-down events in a pop-up menu and a button&Figure 5-15    Three controls in a window Tracking the Cursor in a Control;Listing 5-11    
  164. Using the TrackControl function with a button3Listing 5-12    
  165. Using TrackControl with a pop-up menu)Determining and Changing Control Settings0Listing 5-13    Responding to a click in a checkbox9Listing 5-14    Adjusting scroll bar settings and locations .Listing 5-15    Assigning settings to scroll barsHListing 5-16    Adjusting the maximum and current settings for a scroll barScrolling Through a Document5Figure 5-16    
  166. Moving a document relative to its windowIListing 5-17    
  167. Using ScrollRect to scroll the bits displayed in the window6Figure 5-17    Updating the contents of a scrolled window0Figure 5-18    Restoring the window origin to (0,0)/Figure 5-19    
  168. Scrolling to the end of a documentQFigure 5-20    Updating a window’s contents and returning the window origin to (0,0)1Scrolling in Response to Events in the Scroll Box7Listing 5-18    Responding to mouse events in a scroll bar?Scrolling in Response to Events in Scroll Arrows and Gray AreasEListing 5-19    
  169. Action procedures for scrolling through a text document=Listing 5-20    Moving the scroll box from the action procedures,
  170. Drawing a Scrolled Document Inside a Window2Listing 5-21    An application-defined update routine;Listing 5-22    Redrawing a window containing graphics objectsGListing 5-23    
  171. Redrawing a window after scrolling a TextEdit edit recordMoving and Resizing Scroll Bars,Figure 5-21    Moving and resizing scroll bars EListing 5-24    Changing the size and location of a window’s scroll barsZFigure 5-22    
  172. A vertical scroll bar before the application moves it within a resized windowRFigure 5-23    A vertical scroll bar after the application moves its upper-left point.
  173. Defining Your Own Control Definition FunctionFigure 5-24    A custom controlControl Manager ReferenceData StructuresThe Control Record
  174. The Auxiliary Control Record#The Pop-Up Menu Private Data RecordThe Control Color Table RecordControl Manager RoutinesLTable 5-1    Mapping between new and previous names of Control Manager routines
  175. Creating Controls
  176. GetNewControl
  177. NewControlDrawing Controls
  178. ShowControlUpdateControls DrawControls Draw1Control!Handling Mouse Events in Controls
  179. FindControl TrackControl
  180. TestControl%Changing Control Settings and DisplaySetControlValueSetControlMinimumSetControlMaximumSetControlTitle
  181. HideControl MoveControl SizeControl
  182. HiliteControl DragControl
  183. SetControlColor
  184. SetControlActionDetermining Control ValuesGetControlValueGetControlMinimumGetControlMaximumGetControlTitleGetControlReferenceSetControlReferenceGetControlActionGetControlVariantGetAuxiliaryControlRecord
  185. Removing ControlsDisposeControl KillControlsApplication-Defined Routines-Defining Your Own Control Definition Function    MyControl#Defining Your Own Action ProceduresMyActionMyIndicatorAction    Resources
  186. The Control Resource=Figure 5-25    Structure of a compiled control ('CNTL') resource The Control Color Table ResourceJFigure 5-26    
  187. Structure of a compiled control color table ('cctb') resourceThe Control Definition Function
  188. Summary of the Control ManagerDialog Manager'Introduction to Alerts and Dialog Boxes*Figure 6-1    An alert box used by the FinderFigure 6-2    A typical dialog boxTypes of AlertsFigure 6-3    A note alertFigure 6-4    A caution alertFigure 6-5    A stop alertTypes of Dialog Boxes
  189. Modal Dialog BoxesFigure 6-6    A modal dialog boxMovable Modal Dialog Boxes%Figure 6-7    A movable modal dialog boxModeless Dialog Boxes Figure 6-8    A modeless dialog box 
  190. Items in Alert and Dialog Boxes(Figure 6-9    Typical items in a dialog box Events in Alert and Dialog Boxes1Alert Boxes, Dialog Boxes, and the Window ManagerAbout the Dialog ManagerUsing the Dialog Manager%Creating Alert Sounds and Alert Boxes6Figure 6-10    An alert box to save changes to a document+Listing 6-1    Rez input for an alert resourcePFigure 6-11    An alert box displayed only during the third and fourth alert stagesIListing 6-2    Specifying different alert responses according to alert stage8Listing 6-3    Creating your own sound procedure for alertsCreating Dialog Boxes&Figure 6-12    
  191. A simple modal dialog box+Listing 6-4    Rez input for a dialog resource*Providing Items for Alert and Dialog Boxes>Figure 6-13    
  192. Relationship of various resources to an alert box;Listing 6-5    Rez input for providing an alert box with items
  193. Item Types1Figure 6-14    A safe default button in an alert box
  194. Display RectanglesGFigure 6-15    
  195. The consistent spacing of buttons and text in an alert boxCListing 6-6    
  196. Rez input for consistent spacing of display rectangles\Figure 6-16    
  197. Incorrectly and correctly sized display rectangles for alternate script systems
  198. Enabled and Disabled ItemsResource IDs for Items1Figure 6-17    
  199. Inactive controls and disabled items1Titles for Buttons, Checkboxes, and Radio Buttons3Figure 6-18    A dialog box with OK and Cancel buttons9Figure 6-19    A movable modal dialog box with a Stop button-Figure 6-20    An alert box with a Revert button5
  200. Text Strings for Static Text and Editable Text Items0Figure 6-21    An obscure and useless alert message(Figure 6-22    A less obscure alert message-Figure 6-23    A clear and helpful alert message
  201. Pop-Up Menus as Items)Figure 6-24    A pop-up menu in a dialog boxrListing 6-7    Rez input for a dialog resource and an item list resource for a dialog box that includes a pop-up menuRListing 6-8    Rez input for a control resource and a menu resource for a pop-up menuKeyboard Navigation Among ItemsManipulating Items&Figure 6-25    
  202. A selected scrolling listChanging Static Text6Figure 6-26    An alert box that displays a document nameEListing 6-9    
  203. Using the ParamText procedure to substitute text stringsVListing 6-10    Specifying where ParamText should substitute text in an alert box message%Getting Text From Editable Text Items<Figure 6-27    Two editable text items in a modeless dialog box;Listing 6-11    Specifying editable text items in an item listJListing 6-12    Getting the text entered by the user in an editable text item&Adding Items to an Existing Dialog Box6Figure 6-28    An existing dialog box and items to append3Figure 6-29    The dialog box after items are overlaid@Figure 6-30    The dialog box after items are appended to the rightBFigure 6-31    
  204. The dialog box after items are appended to the bottomKFigure 6-32    A dialog box with an item appended relative to an existing item9Listing 6-13    
  205. Appending an item to an existing dialog boxCListing 6-14    Rez input for a dialog box and the item appended to itPUsing an Application-Defined Item to Draw the Bold Outline 
  206. for a Default ButtonGListing 6-15    
  207. Rez input for an application-defined item in an item listJListing 6-16    Installing the draw procedure for an application-defined itemZListing 6-17    Creating a draw procedure that draws a bold outline around the default button!Displaying Alert and Dialog Boxes"Positioning Alert and Dialog Boxes7Figure 6-33    
  208. An alert box in front of a document window+Figure 6-34    An alert box on the main screenLFigure 6-35    An alert box in the alert position of the document window screen8Deactivating Windows Behind Alert and Modal Dialog BoxesIListing 6-18    Deactivating the front window before displaying an alert boxCFigure 6-36    An alert box displayed only after the third alert stageQListing 6-19    Using GetAlertStage to determine when to deactivate the front window Displaying Modeless Dialog BoxesAFigure 6-37    A modeless dialog box for changing text in a documentYListing 6-20    
  209. Ensuring that the modeless dialog box isn’t already open before creating it'
  210. Adjusting Menus for Modal Dialog Boxes:Figure 6-38    Menu access when displaying a modal dialog box1Listing 6-21    
  211. Adjusting menus for various windowsLListing 6-22    Disabling menus for a modal dialog box with editable text items<Listing 6-23    
  212. Adjusting the Edit menu for a modal dialog box;Adjusting Menus for Movable Modal and Modeless Dialog Boxes+
  213. Displaying Multiple Alert and Dialog Boxes5Displaying Alert and Dialog Boxes From the Background.Including Color in Your Alert and Dialog BoxesZListing 6-24    Rez input for a dialog color table resource using the system’s default colors*
  214. Handling Events in Alert and Dialog Boxes Responding to Events in Controls,
  215. Responding to Events in Editable Text Items2Listing 6-25    Using DialogSelect during null events$
  216. Responding to Events in Alert Boxes?Figure 6-39    Three buttons for which CautionAlert reports events*Responding to Events in Modal Dialog Boxes;Figure 6-40    Four items for which ModalDialog reports events7Listing 6-26    Responding to events in a modal dialog boxAWriting an Event Filter Function for Alert and Modal Dialog BoxesMListing 6-27    A typical event filter function for alert and modal dialog boxesFResponding to Mouse Events in Modeless and 
  217. Movable Modal Dialog BoxesHFigure 6-41    
  218. A modeless dialog box for which DialogSelect reports events7Listing 6-28    Handling mouse-down events for all windowsPListing 6-29    Using the DialogSelect function for responding to mouse-down eventsHListing 6-30    Hiding a modeless dialog box in response to a Close commandIResponding to Keyboard Events in Modeless and 
  219. Movable Modal Dialog BoxesCListing 6-31    Checking for key-down events involving the Command keyBListing 6-32    Checking for key-down events in a modeless dialog boxCListing 6-33    Responding to key-down events in a modeless dialog boxSResponding to Activate and Update Events in Modeless and Movable Modal Dialog Boxes-Listing 6-34    Activating a modeless dialog box+Listing 6-35    Updating a modeless dialog boxClosing Dialog BoxesDialog Manager ReferenceData StructureThe Dialog RecordDialog Manager RoutinesKTable 6-1    Mapping between new and previous names of Dialog Manager routines 
  220. Initializing the Dialog Manager InitDialogs
  221. ErrorSound
  222. SetDialogFontCreating AlertsAlert
  223.  
  224. StopAlert
  225.  
  226. NoteAlert
  227.  
  228. CautionAlert
  229. GetAlertStageResetAlertStage'
  230. Creating and Disposing of Dialog Boxes GetNewDialogNewColorDialog    NewDialog CloseDialog
  231. DisposeDialog,Manipulating Items in Alert and Dialog Boxes
  232. GetDialogItem
  233. SetDialogItemHideDialogItemShowDialogItem
  234. FindDialogItem
  235. AppendDITL ShortenDITL    CountDITL(
  236. Handling Text in Alert and Dialog Boxes    ParamTextGetDialogItemTextSetDialogItemTextSelectDialogItemText    DialogCut
  237. DialogCopy DialogPaste DialogDelete!
  238. Handling Events in Dialog Boxes  ModalDialog
  239. IsDialogEvent DialogSelect
  240. DrawDialog UpdateDialogApplication-Defined RoutinesMyItem MyAlertSound
  241. MyEventFilter    Resources
  242. The Dialog Resource<Figure 6-42    Structure of a compiled dialog ('DLOG') resource
  243. The Alert Resource;Figure 6-43    Structure of a compiled alert ('ALRT') resourceThe Item List Resource?Figure 6-44    Structure of a compiled item list ('DITL') resourcehFigure 6-45    
  244. Structure of compiled button, checkbox, radio button, static text, and editable 
  245. text itemsBFigure 6-46    Structure of compiled control, icon, and picture items=Figure 6-47    
  246. Structure of a compiled application-defined item,Figure 6-48    Structure of compiled help itemsThe Dialog Color Table ResourceThe Alert Color Table ResourceThe Item Color Table Resource=Figure 6-49    Structure of a compiled item color table resource7Figure 6-50    Structure of a compiled control color table4Figure 6-51    Structure of a compiled text style table
  247. Summary of the Dialog ManagerFinder Interface$Introduction to the Finder InterfaceEFigure 7-1    
  248. Application and document icons in a window on the desktop=Figure 7-2    
  249. A customized help balloon for an application icon=Figure 7-3    A Finder message identifying a missing application
  250. About the Finder InterfaceUsing the Finder InterfaceWGiving a Signature to Your Application and a Creator and a 
  251. File Type to Your Documents.Listing 7-1    Rez input for a signature resource
  252. Creating Icons for the FinderOFigure 7-4    Large black-and-white application icons for a company’s product line.Figure 7-5    Default large black-and-white iconsAFigure 7-6    A black-and-white icon and its mask for an application&Figure 7-7    The ResEdit view of an icon/Listing 7-2    Rez input for an icon list resource"Creating Customized Document Icons!Creating File Reference Resources3Listing 7-3    
  253. Rez input for file reference resourcesCreating a Bundle Resource+Listing 7-4    Rez input for a bundle resourceXFigure 7-8    Linking icon list resources and file reference resources in a bundle resource1How and When the Finder Launches Your ApplicationA
  254. Displaying Messages When the Finder Can’t Find 
  255. Your Application8Figure 7-9    The default application-unavailable alert boxEListing 7-5    
  256. Rez input for a missing-application name string resourcebListing 7-6    Storing a missing-application name string resource in the resource fork of 
  257. a documentfListing 7-7    Copying the missing-application name string resource into the resource fork of 
  258. a documentRFigure 7-10    The application-unavailable alert box specifying an application’s nameHListing 7-8    Rez input for an application-missing message string resourceKFigure 7-11    The application-unavailable alert box with a customized messageQFigure 7-12    The application-unavailable alert box for 'TEXT' and 'PICT' documents
  259. Providing Version Resources5Listing 7-9    Rez input for a pair of version resources,Using Finder Information in the Catalog File7Figure 7-13    
  260. The version data in the information windowSupporting Stationery Pads*Listing 7-10    Rez input for a size resource@Listing 7-11    
  261. Determining whether a document is a stationery pad7Distributing Fonts, Sounds, and Other Movable Resources,Providing Balloon Help for Nondocument IconsFFigure 7-14    Default and customized help balloons for application iconsKListing 7-12    
  262. Rez input for a help balloon resource for an application icon
  263. Using Aliases?Listing 7-13    Using the ResolveAliasFile function to open a file3Using the System Folder and Its Related Directories1Figure 7-15    The System Folder and related foldersThe Desktop DatabaseFinder Interface ReferenceData Structures
  264. File Information Record Extended File Information Record
  265. Directory Information Record%Extended Directory Information RecordRoutinesResolving Alias Files
  266. ResolveAliasFileFinding Directories
  267. FindFolder    Resources
  268. The Signature ResourceTFigure 7-16    Structure of a signature resource compiled as a string ('STR ') resourceThe Icon List Resource?Figure 7-17    Structure of a compiled icon list ('ICN#') resourceThe Small Icon List ResourceEFigure 7-18    Structure of a compiled small icon list ('ics#') resource#The Large 4-Bit Color Icon ResourceLFigure 7-19    Structure of a compiled large 4-bit color icon ('icl4') resource#The Small 4-Bit Color Icon ResourceLFigure 7-20    Structure of a compiled small 4-bit color icon ('ics4') resource#The Large 8-Bit Color Icon ResourceLFigure 7-21    Structure of a compiled large 8-bit color icon ('icl8') resource#The Small 8-Bit Color Icon ResourceMFigure 7-22    
  269. Structure of a compiled small 8-bit color icon ('ics8') resourceThe Icon Resource;Figure 7-23    
  270. Structure of a compiled icon ('ICON') resourceThe Color Icon ResourceThe File Reference ResourceDFigure 7-24    Structure of a compiled file reference ('FREF') resourceThe Bundle Resource=Figure 7-25    
  271. Structure of a compiled bundle ('BNDL') resourceMFigure 7-26    
  272. Mapping local IDs to icon list resource IDs in a bundle resourcehFigure 7-27    Structure of superfluous local ID mapping for file reference resources in a 
  273. bundle resource$The Missing-Application Name String LFigure 7-28    Structure of a compiled missing-application name string resource'The Application-Missing Message String OFigure 7-29    Structure of a compiled application-missing message string resourceThe Version Resource;Figure 7-30    
  274. Format of a compiled version ('vers') resource 
  275. Summary of the Finder Interface    
  276. Glossary
  277. Index